/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package snail.data;

import snail.model.User;

/**
 *
 * @author Mickel
 */
public interface IUserDAO extends IGenericDAO<User, Integer> {

    public static final String QUERY_VALIDATE = "user.validate";
    public static final String QUERY_BYEMAIL = "user.byemail";
    public static final String QUERY_ALL = "user.all";
    public static final String QUERY_DELETE = "user.delete";

    /**
     * Helper method to validate a user in terms of authentication.
     * @param email Entered email address.
     * @param password Entered password.
     * @return The user with providen credentials, else <code>null</code>.
     */
    User validateUser(String email, String password);

    User getByEmail(String email);
    
}
